# -*- coding: utf-8 -*-
# @Author : HaleShi
# @Time : 2023-06-27
# @File : 7_AES+Base64.py

import base64
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad



KEY = "b83fbe800858d800"
IV = "yoloho_dayima!%_"

password = "password"

aes = AES.new(
    key=KEY.encode('utf-8'),
    mode=AES.MODE_CBC,
    iv=IV.encode('utf-8')
)
raw = pad(password.encode('utf-8'), 16)
res = base64.b64encode(aes.encrypt(raw))
print(res)


# Pneqv/aCWUxlagDjPcT1oQ==  抓包获取
# Pneqv/aCWUxlagDjPcT1oQ==  自己生成
